package com.aidong.util;

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

public class ThreadManager {
	private static ThreadPoolTaskExecutor pool;
	static {
		ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
		pool.setCorePoolSize(10);
		pool.setMaxPoolSize(50);
		pool.setWaitForTasksToCompleteOnShutdown(true);
		pool.initialize();
	}

	public static ThreadPoolTaskExecutor getPool() {
		return pool;
	}
}
